package com.example.stu1.course.controller;

import com.example.stu1.course.pojo.Course;
import com.example.stu1.course.service.CourseService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;

@RestController
@RequestMapping("/course")
public class CourseController {
    @Resource
    private CourseService service;

    @RequestMapping("/query")
    public ArrayList<Course> query(){ return service.query(); }

    @RequestMapping("/get")
    public Course get(Integer cno) { return service.get(cno); }
}
